//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2021 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto/tree/main/CodeGenerator. DO NOT EDIT.

import Foundation
import SotoCore

extension Route53Resolver {
    // MARK: Enums

    public enum IpAddressStatus: String, CustomStringConvertible, Codable {
        case attached = "ATTACHED"
        case attaching = "ATTACHING"
        case creating = "CREATING"
        case deleteFailedFasExpired = "DELETE_FAILED_FAS_EXPIRED"
        case deleting = "DELETING"
        case detaching = "DETACHING"
        case failedCreation = "FAILED_CREATION"
        case failedResourceGone = "FAILED_RESOURCE_GONE"
        case remapAttaching = "REMAP_ATTACHING"
        case remapDetaching = "REMAP_DETACHING"
        public var description: String { return self.rawValue }
    }

    public enum ResolverDNSSECValidationStatus: String, CustomStringConvertible, Codable {
        case disabled = "DISABLED"
        case disabling = "DISABLING"
        case enabled = "ENABLED"
        case enabling = "ENABLING"
        public var description: String { return self.rawValue }
    }

    public enum ResolverEndpointDirection: String, CustomStringConvertible, Codable {
        case inbound = "INBOUND"
        case outbound = "OUTBOUND"
        public var description: String { return self.rawValue }
    }

    public enum ResolverEndpointStatus: String, CustomStringConvertible, Codable {
        case actionNeeded = "ACTION_NEEDED"
        case autoRecovering = "AUTO_RECOVERING"
        case creating = "CREATING"
        case deleting = "DELETING"
        case operational = "OPERATIONAL"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum ResolverQueryLogConfigAssociationError: String, CustomStringConvertible, Codable {
        case accessDenied = "ACCESS_DENIED"
        case destinationNotFound = "DESTINATION_NOT_FOUND"
        case internalServiceError = "INTERNAL_SERVICE_ERROR"
        case none = "NONE"
        public var description: String { return self.rawValue }
    }

    public enum ResolverQueryLogConfigAssociationStatus: String, CustomStringConvertible, Codable {
        case actionNeeded = "ACTION_NEEDED"
        case active = "ACTIVE"
        case creating = "CREATING"
        case deleting = "DELETING"
        case failed = "FAILED"
        public var description: String { return self.rawValue }
    }

    public enum ResolverQueryLogConfigStatus: String, CustomStringConvertible, Codable {
        case created = "CREATED"
        case creating = "CREATING"
        case deleting = "DELETING"
        case failed = "FAILED"
        public var description: String { return self.rawValue }
    }

    public enum ResolverRuleAssociationStatus: String, CustomStringConvertible, Codable {
        case complete = "COMPLETE"
        case creating = "CREATING"
        case deleting = "DELETING"
        case failed = "FAILED"
        case overridden = "OVERRIDDEN"
        public var description: String { return self.rawValue }
    }

    public enum ResolverRuleStatus: String, CustomStringConvertible, Codable {
        case complete = "COMPLETE"
        case deleting = "DELETING"
        case failed = "FAILED"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum RuleTypeOption: String, CustomStringConvertible, Codable {
        case forward = "FORWARD"
        case recursive = "RECURSIVE"
        case system = "SYSTEM"
        public var description: String { return self.rawValue }
    }

    public enum ShareStatus: String, CustomStringConvertible, Codable {
        case notShared = "NOT_SHARED"
        case sharedByMe = "SHARED_BY_ME"
        case sharedWithMe = "SHARED_WITH_ME"
        public var description: String { return self.rawValue }
    }

    public enum SortOrder: String, CustomStringConvertible, Codable {
        case ascending = "ASCENDING"
        case descending = "DESCENDING"
        public var description: String { return self.rawValue }
    }

    public enum Validation: String, CustomStringConvertible, Codable {
        case disable = "DISABLE"
        case enable = "ENABLE"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AssociateResolverEndpointIpAddressRequest: AWSEncodableShape {
        /// Either the IPv4 address that you want to add to a Resolver endpoint or a subnet ID. If you specify a subnet ID, Resolver chooses an IP address for you from the available IPs in the specified subnet.
        public let ipAddress: IpAddressUpdate
        /// The ID of the Resolver endpoint that you want to associate IP addresses with.
        public let resolverEndpointId: String

        public init(ipAddress: IpAddressUpdate, resolverEndpointId: String) {
            self.ipAddress = ipAddress
            self.resolverEndpointId = resolverEndpointId
        }

        public func validate(name: String) throws {
            try self.ipAddress.validate(name: "\(name).ipAddress")
            try self.validate(self.resolverEndpointId, name: "resolverEndpointId", parent: name, max: 64)
            try self.validate(self.resolverEndpointId, name: "resolverEndpointId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case ipAddress = "IpAddress"
            case resolverEndpointId = "ResolverEndpointId"
        }
    }

    public struct AssociateResolverEndpointIpAddressResponse: AWSDecodableShape {
        /// The response to an AssociateResolverEndpointIpAddress request.
        public let resolverEndpoint: ResolverEndpoint?

        public init(resolverEndpoint: ResolverEndpoint? = nil) {
            self.resolverEndpoint = resolverEndpoint
        }

        private enum CodingKeys: String, CodingKey {
            case resolverEndpoint = "ResolverEndpoint"
        }
    }

    public struct AssociateResolverQueryLogConfigRequest: AWSEncodableShape {
        /// The ID of the query logging configuration that you want to associate a VPC with.
        public let resolverQueryLogConfigId: String
        /// The ID of an Amazon VPC that you want this query logging configuration to log queries for.  The VPCs and the query logging configuration must be in the same Region.
        public let resourceId: String

        public init(resolverQueryLogConfigId: String, resourceId: String) {
            self.resolverQueryLogConfigId = resolverQueryLogConfigId
            self.resourceId = resourceId
        }

        public func validate(name: String) throws {
            try self.validate(self.resolverQueryLogConfigId, name: "resolverQueryLogConfigId", parent: name, max: 64)
            try self.validate(self.resolverQueryLogConfigId, name: "resolverQueryLogConfigId", parent: name, min: 1)
            try self.validate(self.resourceId, name: "resourceId", parent: name, max: 64)
            try self.validate(self.resourceId, name: "resourceId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resolverQueryLogConfigId = "ResolverQueryLogConfigId"
            case resourceId = "ResourceId"
        }
    }

    public struct AssociateResolverQueryLogConfigResponse: AWSDecodableShape {
        /// A complex type that contains settings for a specified association between an Amazon VPC and a query logging configuration.
        public let resolverQueryLogConfigAssociation: ResolverQueryLogConfigAssociation?

        public init(resolverQueryLogConfigAssociation: ResolverQueryLogConfigAssociation? = nil) {
            self.resolverQueryLogConfigAssociation = resolverQueryLogConfigAssociation
        }

        private enum CodingKeys: String, CodingKey {
            case resolverQueryLogConfigAssociation = "ResolverQueryLogConfigAssociation"
        }
    }

    public struct AssociateResolverRuleRequest: AWSEncodableShape {
        /// A name for the association that you're creating between a Resolver rule and a VPC.
        public let name: String?
        /// The ID of the Resolver rule that you want to associate with the VPC. To list the existing Resolver rules, use ListResolverRules.
        public let resolverRuleId: String
        /// The ID of the VPC that you want to associate the Resolver rule with.
        public let vPCId: String

        public init(name: String? = nil, resolverRuleId: String, vPCId: String) {
            self.name = name
            self.resolverRuleId = resolverRuleId
            self.vPCId = vPCId
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, pattern: "(?!^[0-9]+$)([a-zA-Z0-9\\-_' ']+)")
            try self.validate(self.resolverRuleId, name: "resolverRuleId", parent: name, max: 64)
            try self.validate(self.resolverRuleId, name: "resolverRuleId", parent: name, min: 1)
            try self.validate(self.vPCId, name: "vPCId", parent: name, max: 64)
            try self.validate(self.vPCId, name: "vPCId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case resolverRuleId = "ResolverRuleId"
            case vPCId = "VPCId"
        }
    }

    public struct AssociateResolverRuleResponse: AWSDecodableShape {
        /// Information about the AssociateResolverRule request, including the status of the request.
        public let resolverRuleAssociation: ResolverRuleAssociation?

        public init(resolverRuleAssociation: ResolverRuleAssociation? = nil) {
            self.resolverRuleAssociation = resolverRuleAssociation
        }

        private enum CodingKeys: String, CodingKey {
            case resolverRuleAssociation = "ResolverRuleAssociation"
        }
    }

    public struct CreateResolverEndpointRequest: AWSEncodableShape {
        /// A unique string that identifies the request and that allows failed requests to be retried without the risk of executing the operation twice. CreatorRequestId can be any unique string, for example, a date/time stamp.
        public let creatorRequestId: String
        /// Specify the applicable value:    INBOUND: Resolver forwards DNS queries to the DNS service for a VPC from your network    OUTBOUND: Resolver forwards DNS queries from the DNS service for a VPC to your network
        public let direction: ResolverEndpointDirection
        /// The subnets and IP addresses in your VPC that DNS queries originate from (for outbound endpoints) or that you forward DNS queries to (for inbound endpoints). The subnet ID uniquely identifies a VPC.
        public let ipAddresses: [IpAddressRequest]
        /// A friendly name that lets you easily find a configuration in the Resolver dashboard in the Route 53 console.
        public let name: String?
        /// The ID of one or more security groups that you want to use to control access to this VPC. The security group that you specify must include one or more inbound rules (for inbound Resolver endpoints) or outbound rules (for outbound Resolver endpoints). Inbound and outbound rules must allow TCP and UDP access. For inbound access, open port 53. For outbound access, open the port that you're using for DNS queries on your network.
        public let securityGroupIds: [String]
        /// A list of the tag keys and values that you want to associate with the endpoint.
        public let tags: [Tag]?

        public init(creatorRequestId: String, direction: ResolverEndpointDirection, ipAddresses: [IpAddressRequest], name: String? = nil, securityGroupIds: [String], tags: [Tag]? = nil) {
            self.creatorRequestId = creatorRequestId
            self.direction = direction
            self.ipAddresses = ipAddresses
            self.name = name
            self.securityGroupIds = securityGroupIds
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.creatorRequestId, name: "creatorRequestId", parent: name, max: 255)
            try self.validate(self.creatorRequestId, name: "creatorRequestId", parent: name, min: 1)
            try self.ipAddresses.forEach {
                try $0.validate(name: "\(name).ipAddresses[]")
            }
            try self.validate(self.ipAddresses, name: "ipAddresses", parent: name, max: 10)
            try self.validate(self.ipAddresses, name: "ipAddresses", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, pattern: "(?!^[0-9]+$)([a-zA-Z0-9\\-_' ']+)")
            try self.securityGroupIds.forEach {
                try validate($0, name: "securityGroupIds[]", parent: name, max: 64)
                try validate($0, name: "securityGroupIds[]", parent: name, min: 1)
            }
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case creatorRequestId = "CreatorRequestId"
            case direction = "Direction"
            case ipAddresses = "IpAddresses"
            case name = "Name"
            case securityGroupIds = "SecurityGroupIds"
            case tags = "Tags"
        }
    }

    public struct CreateResolverEndpointResponse: AWSDecodableShape {
        /// Information about the CreateResolverEndpoint request, including the status of the request.
        public let resolverEndpoint: ResolverEndpoint?

        public init(resolverEndpoint: ResolverEndpoint? = nil) {
            self.resolverEndpoint = resolverEndpoint
        }

        private enum CodingKeys: String, CodingKey {
            case resolverEndpoint = "ResolverEndpoint"
        }
    }

    public struct CreateResolverQueryLogConfigRequest: AWSEncodableShape {
        /// A unique string that identifies the request and that allows failed requests to be retried without the risk of executing the operation twice. CreatorRequestId can be any unique string, for example, a date/time stamp.
        public let creatorRequestId: String
        /// The ARN of the resource that you want Resolver to send query logs. You can send query logs to an S3 bucket, a CloudWatch Logs log group, or a Kinesis Data Firehose delivery stream. Examples of valid values include the following:    S3 bucket:   arn:aws:s3:::examplebucket  You can optionally append a file prefix to the end of the ARN.  arn:aws:s3:::examplebucket/development/     CloudWatch Logs log group:   arn:aws:logs:us-west-1:123456789012:log-group:/mystack-testgroup-12ABC1AB12A1:*     Kinesis Data Firehose delivery stream:  arn:aws:kinesis:us-east-2:0123456789:stream/my_stream_name
        public let destinationArn: String
        /// The name that you want to give the query logging configuration
        public let name: String
        /// A list of the tag keys and values that you want to associate with the query logging configuration.
        public let tags: [Tag]?

        public init(creatorRequestId: String = CreateResolverQueryLogConfigRequest.idempotencyToken(), destinationArn: String, name: String, tags: [Tag]? = nil) {
            self.creatorRequestId = creatorRequestId
            self.destinationArn = destinationArn
            self.name = name
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.creatorRequestId, name: "creatorRequestId", parent: name, max: 255)
            try self.validate(self.creatorRequestId, name: "creatorRequestId", parent: name, min: 1)
            try self.validate(self.destinationArn, name: "destinationArn", parent: name, max: 600)
            try self.validate(self.destinationArn, name: "destinationArn", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "(?!^[0-9]+$)([a-zA-Z0-9\\-_' ']+)")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case creatorRequestId = "CreatorRequestId"
            case destinationArn = "DestinationArn"
            case name = "Name"
            case tags = "Tags"
        }
    }

    public struct CreateResolverQueryLogConfigResponse: AWSDecodableShape {
        /// Information about the CreateResolverQueryLogConfig request, including the status of the request.
        public let resolverQueryLogConfig: ResolverQueryLogConfig?

        public init(resolverQueryLogConfig: ResolverQueryLogConfig? = nil) {
            self.resolverQueryLogConfig = resolverQueryLogConfig
        }

        private enum CodingKeys: String, CodingKey {
            case resolverQueryLogConfig = "ResolverQueryLogConfig"
        }
    }

    public struct CreateResolverRuleRequest: AWSEncodableShape {
        /// A unique string that identifies the request and that allows failed requests to be retried without the risk of executing the operation twice. CreatorRequestId can be any unique string, for example, a date/time stamp.
        public let creatorRequestId: String
        /// DNS queries for this domain name are forwarded to the IP addresses that you specify in TargetIps. If a query matches multiple Resolver rules (example.com and www.example.com), outbound DNS queries are routed using the Resolver rule that contains the most specific domain name (www.example.com).
        public let domainName: String
        /// A friendly name that lets you easily find a rule in the Resolver dashboard in the Route 53 console.
        public let name: String?
        /// The ID of the outbound Resolver endpoint that you want to use to route DNS queries to the IP addresses that you specify in TargetIps.
        public let resolverEndpointId: String?
        /// When you want to forward DNS queries for specified domain name to resolvers on your network, specify FORWARD. When you have a forwarding rule to forward DNS queries for a domain to your network and you want Resolver to process queries for a subdomain of that domain, specify SYSTEM. For example, to forward DNS queries for example.com to resolvers on your network, you create a rule and specify FORWARD for RuleType. To then have Resolver process queries for apex.example.com, you create a rule and specify SYSTEM for RuleType. Currently, only Resolver can create rules that have a value of RECURSIVE for RuleType.
        public let ruleType: RuleTypeOption
        /// A list of the tag keys and values that you want to associate with the endpoint.
        public let tags: [Tag]?
        /// The IPs that you want Resolver to forward DNS queries to. You can specify only IPv4 addresses. Separate IP addresses with a comma.  TargetIps is available only when the value of Rule type is FORWARD.
        public let targetIps: [TargetAddress]?

        public init(creatorRequestId: String, domainName: String, name: String? = nil, resolverEndpointId: String? = nil, ruleType: RuleTypeOption, tags: [Tag]? = nil, targetIps: [TargetAddress]? = nil) {
            self.creatorRequestId = creatorRequestId
            self.domainName = domainName
            self.name = name
            self.resolverEndpointId = resolverEndpointId
            self.ruleType = ruleType
            self.tags = tags
            self.targetIps = targetIps
        }

        public func validate(name: String) throws {
            try self.validate(self.creatorRequestId, name: "creatorRequestId", parent: name, max: 255)
            try self.validate(self.creatorRequestId, name: "creatorRequestId", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, max: 256)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, pattern: "(?!^[0-9]+$)([a-zA-Z0-9\\-_' ']+)")
            try self.validate(self.resolverEndpointId, name: "resolverEndpointId", parent: name, max: 64)
            try self.validate(self.resolverEndpointId, name: "resolverEndpointId", parent: name, min: 1)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
            try self.targetIps?.forEach {
                try $0.validate(name: "\(name).targetIps[]")
            }
            try self.validate(self.targetIps, name: "targetIps", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case creatorRequestId = "CreatorRequestId"
            case domainName = "DomainName"
            case name = "Name"
            case resolverEndpointId = "ResolverEndpointId"
            case ruleType = "RuleType"
            case tags = "Tags"
            case targetIps = "TargetIps"
        }
    }

    public struct CreateResolverRuleResponse: AWSDecodableShape {
        /// Information about the CreateResolverRule request, including the status of the request.
        public let resolverRule: ResolverRule?

        public init(resolverRule: ResolverRule? = nil) {
            self.resolverRule = resolverRule
        }

        private enum CodingKeys: String, CodingKey {
            case resolverRule = "ResolverRule"
        }
    }

    public struct DeleteResolverEndpointRequest: AWSEncodableShape {
        /// The ID of the Resolver endpoint that you want to delete.
        public let resolverEndpointId: String

        public init(resolverEndpointId: String) {
            self.resolverEndpointId = resolverEndpointId
        }

        public func validate(name: String) throws {
            try self.validate(self.resolverEndpointId, name: "resolverEndpointId", parent: name, max: 64)
            try self.validate(self.resolverEndpointId, name: "resolverEndpointId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resolverEndpointId = "ResolverEndpointId"
        }
    }

    public struct DeleteResolverEndpointResponse: AWSDecodableShape {
        /// Information about the DeleteResolverEndpoint request, including the status of the request.
        public let resolverEndpoint: ResolverEndpoint?

        public init(resolverEndpoint: ResolverEndpoint? = nil) {
            self.resolverEndpoint = resolverEndpoint
        }

        private enum CodingKeys: String, CodingKey {
            case resolverEndpoint = "ResolverEndpoint"
        }
    }

    public struct DeleteResolverQueryLogConfigRequest: AWSEncodableShape {
        /// The ID of the query logging configuration that you want to delete.
        public let resolverQueryLogConfigId: String

        public init(resolverQueryLogConfigId: String) {
            self.resolverQueryLogConfigId = resolverQueryLogConfigId
        }

        public func validate(name: String) throws {
            try self.validate(self.resolverQueryLogConfigId, name: "resolverQueryLogConfigId", parent: name, max: 64)
            try self.validate(self.resolverQueryLogConfigId, name: "resolverQueryLogConfigId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resolverQueryLogConfigId = "ResolverQueryLogConfigId"
        }
    }

    public struct DeleteResolverQueryLogConfigResponse: AWSDecodableShape {
        /// Information about the query logging configuration that you deleted, including the status of the request.
        public let resolverQueryLogConfig: ResolverQueryLogConfig?

        public init(resolverQueryLogConfig: ResolverQueryLogConfig? = nil) {
            self.resolverQueryLogConfig = resolverQueryLogConfig
        }

        private enum CodingKeys: String, CodingKey {
            case resolverQueryLogConfig = "ResolverQueryLogConfig"
        }
    }

    public struct DeleteResolverRuleRequest: AWSEncodableShape {
        /// The ID of the Resolver rule that you want to delete.
        public let resolverRuleId: String

        public init(resolverRuleId: String) {
            self.resolverRuleId = resolverRuleId
        }

        public func validate(name: String) throws {
            try self.validate(self.resolverRuleId, name: "resolverRuleId", parent: name, max: 64)
            try self.validate(self.resolverRuleId, name: "resolverRuleId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resolverRuleId = "ResolverRuleId"
        }
    }

    public struct DeleteResolverRuleResponse: AWSDecodableShape {
        /// Information about the DeleteResolverRule request, including the status of the request.
        public let resolverRule: ResolverRule?

        public init(resolverRule: ResolverRule? = nil) {
            self.resolverRule = resolverRule
        }

        private enum CodingKeys: String, CodingKey {
            case resolverRule = "ResolverRule"
        }
    }

    public struct DisassociateResolverEndpointIpAddressRequest: AWSEncodableShape {
        /// The IPv4 address that you want to remove from a Resolver endpoint.
        public let ipAddress: IpAddressUpdate
        /// The ID of the Resolver endpoint that you want to disassociate an IP address from.
        public let resolverEndpointId: String

        public init(ipAddress: IpAddressUpdate, resolverEndpointId: String) {
            self.ipAddress = ipAddress
            self.resolverEndpointId = resolverEndpointId
        }

        public func validate(name: String) throws {
            try self.ipAddress.validate(name: "\(name).ipAddress")
            try self.validate(self.resolverEndpointId, name: "resolverEndpointId", parent: name, max: 64)
            try self.validate(self.resolverEndpointId, name: "resolverEndpointId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case ipAddress = "IpAddress"
            case resolverEndpointId = "ResolverEndpointId"
        }
    }

    public struct DisassociateResolverEndpointIpAddressResponse: AWSDecodableShape {
        /// The response to an DisassociateResolverEndpointIpAddress request.
        public let resolverEndpoint: ResolverEndpoint?

        public init(resolverEndpoint: ResolverEndpoint? = nil) {
            self.resolverEndpoint = resolverEndpoint
        }

        private enum CodingKeys: String, CodingKey {
            case resolverEndpoint = "ResolverEndpoint"
        }
    }

    public struct DisassociateResolverQueryLogConfigRequest: AWSEncodableShape {
        /// The ID of the query logging configuration that you want to disassociate a specified VPC from.
        public let resolverQueryLogConfigId: String
        /// The ID of the Amazon VPC that you want to disassociate from a specified query logging configuration.
        public let resourceId: String

        public init(resolverQueryLogConfigId: String, resourceId: String) {
            self.resolverQueryLogConfigId = resolverQueryLogConfigId
            self.resourceId = resourceId
        }

        public func validate(name: String) throws {
            try self.validate(self.resolverQueryLogConfigId, name: "resolverQueryLogConfigId", parent: name, max: 64)
            try self.validate(self.resolverQueryLogConfigId, name: "resolverQueryLogConfigId", parent: name, min: 1)
            try self.validate(self.resourceId, name: "resourceId", parent: name, max: 64)
            try self.validate(self.resourceId, name: "resourceId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resolverQueryLogConfigId = "ResolverQueryLogConfigId"
            case resourceId = "ResourceId"
        }
    }

    public struct DisassociateResolverQueryLogConfigResponse: AWSDecodableShape {
        /// A complex type that contains settings for the association that you deleted between an Amazon VPC and a query logging configuration.
        public let resolverQueryLogConfigAssociation: ResolverQueryLogConfigAssociation?

        public init(resolverQueryLogConfigAssociation: ResolverQueryLogConfigAssociation? = nil) {
            self.resolverQueryLogConfigAssociation = resolverQueryLogConfigAssociation
        }

        private enum CodingKeys: String, CodingKey {
            case resolverQueryLogConfigAssociation = "ResolverQueryLogConfigAssociation"
        }
    }

    public struct DisassociateResolverRuleRequest: AWSEncodableShape {
        /// The ID of the Resolver rule that you want to disassociate from the specified VPC.
        public let resolverRuleId: String
        /// The ID of the VPC that you want to disassociate the Resolver rule from.
        public let vPCId: String

        public init(resolverRuleId: String, vPCId: String) {
            self.resolverRuleId = resolverRuleId
            self.vPCId = vPCId
        }

        public func validate(name: String) throws {
            try self.validate(self.resolverRuleId, name: "resolverRuleId", parent: name, max: 64)
            try self.validate(self.resolverRuleId, name: "resolverRuleId", parent: name, min: 1)
            try self.validate(self.vPCId, name: "vPCId", parent: name, max: 64)
            try self.validate(self.vPCId, name: "vPCId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resolverRuleId = "ResolverRuleId"
            case vPCId = "VPCId"
        }
    }

    public struct DisassociateResolverRuleResponse: AWSDecodableShape {
        /// Information about the DisassociateResolverRule request, including the status of the request.
        public let resolverRuleAssociation: ResolverRuleAssociation?

        public init(resolverRuleAssociation: ResolverRuleAssociation? = nil) {
            self.resolverRuleAssociation = resolverRuleAssociation
        }

        private enum CodingKeys: String, CodingKey {
            case resolverRuleAssociation = "ResolverRuleAssociation"
        }
    }

    public struct Filter: AWSEncodableShape {
        /// The name of the parameter that you want to use to filter objects. The valid values for Name depend on the action that you're including the filter in, ListResolverEndpoints, ListResolverRules, ListResolverRuleAssociations, ListResolverQueryLogConfigs, or ListResolverQueryLogConfigAssociations.  In early versions of Resolver, values for Name were listed as uppercase, with underscore (_) delimiters. For example, CreatorRequestId was originally listed as CREATOR_REQUEST_ID. Uppercase values for Name are still supported.   ListResolverEndpoints  Valid values for Name include the following:    CreatorRequestId: The value that you specified when you created the Resolver endpoint.    Direction: Whether you want to return inbound or outbound Resolver endpoints. If you specify DIRECTION for Name, specify INBOUND or OUTBOUND for Values.    HostVpcId: The ID of the VPC that inbound DNS queries pass through on the way from your network to your VPCs in a region, or the VPC that outbound queries pass through on the way from your VPCs to your network. In a CreateResolverEndpoint request, SubnetId indirectly identifies the VPC. In a GetResolverEndpoint request, the VPC ID for a Resolver endpoint is returned in the HostVPCId element.     IpAddressCount: The number of IP addresses that you have associated with the Resolver endpoint.    Name: The name of the Resolver endpoint.    SecurityGroupIds: The IDs of the VPC security groups that you specified when you created the Resolver endpoint.    Status: The status of the Resolver endpoint. If you specify Status for Name, specify one of the following status codes for Values: CREATING, OPERATIONAL, UPDATING, AUTO_RECOVERING, ACTION_NEEDED, or DELETING. For more information, see Status in ResolverEndpoint.    ListResolverRules  Valid values for Name include the following:    CreatorRequestId: The value that you specified when you created the Resolver rule.    DomainName: The domain name for which Resolver is forwarding DNS queries to your network. In the value that you specify for Values, include a trailing dot (.) after the domain name. For example, if the domain name is example.com, specify the following value. Note the "." after com:  example.com.     Name: The name of the Resolver rule.    ResolverEndpointId: The ID of the Resolver endpoint that the Resolver rule is associated with.  You can filter on the Resolver endpoint only for rules that have a value of FORWARD for RuleType.     Status: The status of the Resolver rule. If you specify Status for Name, specify one of the following status codes for Values: COMPLETE, DELETING, UPDATING, or FAILED.    Type: The type of the Resolver rule. If you specify TYPE for Name, specify FORWARD or SYSTEM for Values.    ListResolverRuleAssociations  Valid values for Name include the following:    Name: The name of the Resolver rule association.    ResolverRuleId: The ID of the Resolver rule that is associated with one or more VPCs.    Status: The status of the Resolver rule association. If you specify Status for Name, specify one of the following status codes for Values: CREATING, COMPLETE, DELETING, or FAILED.    VPCId: The ID of the VPC that the Resolver rule is associated with.    ListResolverQueryLogConfigs  Valid values for Name include the following:    Arn: The ARN for the query logging configuration.    AssociationCount: The number of VPCs that are associated with the query logging configuration.    CreationTime: The date and time that the query logging configuration was created, in Unix time format and Coordinated Universal Time (UTC).     CreatorRequestId: A unique string that identifies the request that created the query logging configuration.    Destination: The AWS service that you want to forward query logs to. Valid values include the following:    S3     CloudWatchLogs     KinesisFirehose       DestinationArn: The ARN of the location that Resolver is sending query logs to. This value can be the ARN for an S3 bucket, a CloudWatch Logs log group, or a Kinesis Data Firehose delivery stream.    Id: The ID of the query logging configuration    Name: The name of the query logging configuration    OwnerId: The AWS account ID for the account that created the query logging configuration.    ShareStatus: An indication of whether the query logging configuration is shared with other AWS accounts, or was shared with the current account by another AWS account. Valid values include: NOT_SHARED, SHARED_WITH_ME, or SHARED_BY_ME.    Status: The status of the query logging configuration. If you specify Status for Name, specify the applicable status code for Values: CREATING, CREATED, DELETING, or FAILED. For more information, see Status.     ListResolverQueryLogConfigAssociations  Valid values for Name include the following:    CreationTime: The date and time that the VPC was associated with the query logging configuration, in Unix time format and Coordinated Universal Time (UTC).    Error: If the value of Status is FAILED, specify the cause: DESTINATION_NOT_FOUND or ACCESS_DENIED.    Id: The ID of the query logging association.    ResolverQueryLogConfigId: The ID of the query logging configuration that a VPC is associated with.    ResourceId: The ID of the Amazon VPC that is associated with the query logging configuration.    Status: The status of the query logging association. If you specify Status for Name, specify the applicable status code for Values: CREATING, CREATED, DELETING, or FAILED. For more information, see Status.
        public let name: String?
        /// When you're using a List operation and you want the operation to return a subset of objects, such as Resolver endpoints or Resolver rules, the value of the parameter that you want to use to filter objects. For example, to list only inbound Resolver endpoints, specify Direction for Name and specify INBOUND for Values.
        public let values: [String]?

        public init(name: String? = nil, values: [String]? = nil) {
            self.name = name
            self.values = values
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.values?.forEach {
                try validate($0, name: "values[]", parent: name, max: 600)
                try validate($0, name: "values[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case values = "Values"
        }
    }

    public struct GetResolverDnssecConfigRequest: AWSEncodableShape {
        /// The ID of the virtual private cloud (VPC) for the DNSSEC validation status.
        public let resourceId: String

        public init(resourceId: String) {
            self.resourceId = resourceId
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceId, name: "resourceId", parent: name, max: 64)
            try self.validate(self.resourceId, name: "resourceId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceId = "ResourceId"
        }
    }

    public struct GetResolverDnssecConfigResponse: AWSDecodableShape {
        /// The information about a configuration for DNSSEC validation.
        public let resolverDNSSECConfig: ResolverDnssecConfig?

        public init(resolverDNSSECConfig: ResolverDnssecConfig? = nil) {
            self.resolverDNSSECConfig = resolverDNSSECConfig
        }

        private enum CodingKeys: String, CodingKey {
            case resolverDNSSECConfig = "ResolverDNSSECConfig"
        }
    }

    public struct GetResolverEndpointRequest: AWSEncodableShape {
        /// The ID of the Resolver endpoint that you want to get information about.
        public let resolverEndpointId: String

        public init(resolverEndpointId: String) {
            self.resolverEndpointId = resolverEndpointId
        }

        public func validate(name: String) throws {
            try self.validate(self.resolverEndpointId, name: "resolverEndpointId", parent: name, max: 64)
            try self.validate(self.resolverEndpointId, name: "resolverEndpointId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resolverEndpointId = "ResolverEndpointId"
        }
    }

    public struct GetResolverEndpointResponse: AWSDecodableShape {
        /// Information about the Resolver endpoint that you specified in a GetResolverEndpoint request.
        public let resolverEndpoint: ResolverEndpoint?

        public init(resolverEndpoint: ResolverEndpoint? = nil) {
            self.resolverEndpoint = resolverEndpoint
        }

        private enum CodingKeys: String, CodingKey {
            case resolverEndpoint = "ResolverEndpoint"
        }
    }

    public struct GetResolverQueryLogConfigAssociationRequest: AWSEncodableShape {
        /// The ID of the Resolver query logging configuration association that you want to get information about.
        public let resolverQueryLogConfigAssociationId: String

        public init(resolverQueryLogConfigAssociationId: String) {
            self.resolverQueryLogConfigAssociationId = resolverQueryLogConfigAssociationId
        }

        public func validate(name: String) throws {
            try self.validate(self.resolverQueryLogConfigAssociationId, name: "resolverQueryLogConfigAssociationId", parent: name, max: 64)
            try self.validate(self.resolverQueryLogConfigAssociationId, name: "resolverQueryLogConfigAssociationId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resolverQueryLogConfigAssociationId = "ResolverQueryLogConfigAssociationId"
        }
    }

    public struct GetResolverQueryLogConfigAssociationResponse: AWSDecodableShape {
        /// Information about the Resolver query logging configuration association that you specified in a GetQueryLogConfigAssociation request.
        public let resolverQueryLogConfigAssociation: ResolverQueryLogConfigAssociation?

        public init(resolverQueryLogConfigAssociation: ResolverQueryLogConfigAssociation? = nil) {
            self.resolverQueryLogConfigAssociation = resolverQueryLogConfigAssociation
        }

        private enum CodingKeys: String, CodingKey {
            case resolverQueryLogConfigAssociation = "ResolverQueryLogConfigAssociation"
        }
    }

    public struct GetResolverQueryLogConfigPolicyRequest: AWSEncodableShape {
        /// The ARN of the query logging configuration that you want to get the query logging policy for.
        public let arn: String

        public init(arn: String) {
            self.arn = arn
        }

        public func validate(name: String) throws {
            try self.validate(self.arn, name: "arn", parent: name, max: 255)
            try self.validate(self.arn, name: "arn", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
        }
    }

    public struct GetResolverQueryLogConfigPolicyResponse: AWSDecodableShape {
        /// Information about the query logging policy for the query logging configuration that you specified in a GetResolverQueryLogConfigPolicy request.
        public let resolverQueryLogConfigPolicy: String?

        public init(resolverQueryLogConfigPolicy: String? = nil) {
            self.resolverQueryLogConfigPolicy = resolverQueryLogConfigPolicy
        }

        private enum CodingKeys: String, CodingKey {
            case resolverQueryLogConfigPolicy = "ResolverQueryLogConfigPolicy"
        }
    }

    public struct GetResolverQueryLogConfigRequest: AWSEncodableShape {
        /// The ID of the Resolver query logging configuration that you want to get information about.
        public let resolverQueryLogConfigId: String

        public init(resolverQueryLogConfigId: String) {
            self.resolverQueryLogConfigId = resolverQueryLogConfigId
        }

        public func validate(name: String) throws {
            try self.validate(self.resolverQueryLogConfigId, name: "resolverQueryLogConfigId", parent: name, max: 64)
            try self.validate(self.resolverQueryLogConfigId, name: "resolverQueryLogConfigId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resolverQueryLogConfigId = "ResolverQueryLogConfigId"
        }
    }

    public struct GetResolverQueryLogConfigResponse: AWSDecodableShape {
        /// Information about the Resolver query logging configuration that you specified in a GetQueryLogConfig request.
        public let resolverQueryLogConfig: ResolverQueryLogConfig?

        public init(resolverQueryLogConfig: ResolverQueryLogConfig? = nil) {
            self.resolverQueryLogConfig = resolverQueryLogConfig
        }

        private enum CodingKeys: String, CodingKey {
            case resolverQueryLogConfig = "ResolverQueryLogConfig"
        }
    }

    public struct GetResolverRuleAssociationRequest: AWSEncodableShape {
        /// The ID of the Resolver rule association that you want to get information about.
        public let resolverRuleAssociationId: String

        public init(resolverRuleAssociationId: String) {
            self.resolverRuleAssociationId = resolverRuleAssociationId
        }

        public func validate(name: String) throws {
            try self.validate(self.resolverRuleAssociationId, name: "resolverRuleAssociationId", parent: name, max: 64)
            try self.validate(self.resolverRuleAssociationId, name: "resolverRuleAssociationId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resolverRuleAssociationId = "ResolverRuleAssociationId"
        }
    }

    public struct GetResolverRuleAssociationResponse: AWSDecodableShape {
        /// Information about the Resolver rule association that you specified in a GetResolverRuleAssociation request.
        public let resolverRuleAssociation: ResolverRuleAssociation?

        public init(resolverRuleAssociation: ResolverRuleAssociation? = nil) {
            self.resolverRuleAssociation = resolverRuleAssociation
        }

        private enum CodingKeys: String, CodingKey {
            case resolverRuleAssociation = "ResolverRuleAssociation"
        }
    }

    public struct GetResolverRulePolicyRequest: AWSEncodableShape {
        /// The ID of the Resolver rule that you want to get the Resolver rule policy for.
        public let arn: String

        public init(arn: String) {
            self.arn = arn
        }

        public func validate(name: String) throws {
            try self.validate(self.arn, name: "arn", parent: name, max: 255)
            try self.validate(self.arn, name: "arn", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
        }
    }

    public struct GetResolverRulePolicyResponse: AWSDecodableShape {
        /// The Resolver rule policy for the rule that you specified in a GetResolverRulePolicy request.
        public let resolverRulePolicy: String?

        public init(resolverRulePolicy: String? = nil) {
            self.resolverRulePolicy = resolverRulePolicy
        }

        private enum CodingKeys: String, CodingKey {
            case resolverRulePolicy = "ResolverRulePolicy"
        }
    }

    public struct GetResolverRuleRequest: AWSEncodableShape {
        /// The ID of the Resolver rule that you want to get information about.
        public let resolverRuleId: String

        public init(resolverRuleId: String) {
            self.resolverRuleId = resolverRuleId
        }

        public func validate(name: String) throws {
            try self.validate(self.resolverRuleId, name: "resolverRuleId", parent: name, max: 64)
            try self.validate(self.resolverRuleId, name: "resolverRuleId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resolverRuleId = "ResolverRuleId"
        }
    }

    public struct GetResolverRuleResponse: AWSDecodableShape {
        /// Information about the Resolver rule that you specified in a GetResolverRule request.
        public let resolverRule: ResolverRule?

        public init(resolverRule: ResolverRule? = nil) {
            self.resolverRule = resolverRule
        }

        private enum CodingKeys: String, CodingKey {
            case resolverRule = "ResolverRule"
        }
    }

    public struct IpAddressRequest: AWSEncodableShape {
        /// The IP address that you want to use for DNS queries.
        public let ip: String?
        /// The ID of the subnet that contains the IP address.
        public let subnetId: String

        public init(ip: String? = nil, subnetId: String) {
            self.ip = ip
            self.subnetId = subnetId
        }

        public func validate(name: String) throws {
            try self.validate(self.ip, name: "ip", parent: name, max: 36)
            try self.validate(self.ip, name: "ip", parent: name, min: 7)
            try self.validate(self.subnetId, name: "subnetId", parent: name, max: 32)
            try self.validate(self.subnetId, name: "subnetId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case ip = "Ip"
            case subnetId = "SubnetId"
        }
    }

    public struct IpAddressResponse: AWSDecodableShape {
        /// The date and time that the IP address was created, in Unix time format and Coordinated Universal Time (UTC).
        public let creationTime: String?
        /// One IP address that the Resolver endpoint uses for DNS queries.
        public let ip: String?
        /// The ID of one IP address.
        public let ipId: String?
        /// The date and time that the IP address was last modified, in Unix time format and Coordinated Universal Time (UTC).
        public let modificationTime: String?
        /// A status code that gives the current status of the request.
        public let status: IpAddressStatus?
        /// A message that provides additional information about the status of the request.
        public let statusMessage: String?
        /// The ID of one subnet.
        public let subnetId: String?

        public init(creationTime: String? = nil, ip: String? = nil, ipId: String? = nil, modificationTime: String? = nil, status: IpAddressStatus? = nil, statusMessage: String? = nil, subnetId: String? = nil) {
            self.creationTime = creationTime
            self.ip = ip
            self.ipId = ipId
            self.modificationTime = modificationTime
            self.status = status
            self.statusMessage = statusMessage
            self.subnetId = subnetId
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime = "CreationTime"
            case ip = "Ip"
            case ipId = "IpId"
            case modificationTime = "ModificationTime"
            case status = "Status"
            case statusMessage = "StatusMessage"
            case subnetId = "SubnetId"
        }
    }

    public struct IpAddressUpdate: AWSEncodableShape {
        /// The new IP address.
        public let ip: String?
        ///  Only when removing an IP address from a Resolver endpoint: The ID of the IP address that you want to remove. To get this ID, use GetResolverEndpoint.
        public let ipId: String?
        /// The ID of the subnet that includes the IP address that you want to update. To get this ID, use GetResolverEndpoint.
        public let subnetId: String?

        public init(ip: String? = nil, ipId: String? = nil, subnetId: String? = nil) {
            self.ip = ip
            self.ipId = ipId
            self.subnetId = subnetId
        }

        public func validate(name: String) throws {
            try self.validate(self.ip, name: "ip", parent: name, max: 36)
            try self.validate(self.ip, name: "ip", parent: name, min: 7)
            try self.validate(self.ipId, name: "ipId", parent: name, max: 64)
            try self.validate(self.ipId, name: "ipId", parent: name, min: 1)
            try self.validate(self.subnetId, name: "subnetId", parent: name, max: 32)
            try self.validate(self.subnetId, name: "subnetId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case ip = "Ip"
            case ipId = "IpId"
            case subnetId = "SubnetId"
        }
    }

    public struct ListResolverDnssecConfigsRequest: AWSEncodableShape {
        /// An optional specification to return a subset of objects.
        public let filters: [Filter]?
        ///  Optional: An integer that specifies the maximum number of DNSSEC configuration results that you want Amazon Route 53 to return. If you don't specify a value for MaxResults, Route 53 returns up to 100 configuration per page.
        public let maxResults: Int?
        /// (Optional) If the current AWS account has more than MaxResults DNSSEC configurations, use NextToken to get the second and subsequent pages of results. For the first ListResolverDnssecConfigs request, omit this value. For the second and subsequent requests, get the value of NextToken from the previous response and specify that value for NextToken in the request.
        public let nextToken: String?

        public init(filters: [Filter]? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filters = filters
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filters?.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filters = "Filters"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListResolverDnssecConfigsResponse: AWSDecodableShape {
        /// If a response includes the last of the DNSSEC configurations that are associated with the current AWS account, NextToken doesn't appear in the response. If a response doesn't include the last of the configurations, you can get more configurations by submitting another ListResolverDnssecConfigs request. Get the value of NextToken that Amazon Route 53 returned in the previous response and include it in NextToken in the next request.
        public let nextToken: String?
        /// An array that contains one ResolverDnssecConfig element for each configuration for DNSSEC validation that is associated with the current AWS account.
        public let resolverDnssecConfigs: [ResolverDnssecConfig]?

        public init(nextToken: String? = nil, resolverDnssecConfigs: [ResolverDnssecConfig]? = nil) {
            self.nextToken = nextToken
            self.resolverDnssecConfigs = resolverDnssecConfigs
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case resolverDnssecConfigs = "ResolverDnssecConfigs"
        }
    }

    public struct ListResolverEndpointIpAddressesRequest: AWSEncodableShape {
        /// The maximum number of IP addresses that you want to return in the response to a ListResolverEndpointIpAddresses request. If you don't specify a value for MaxResults, Resolver returns up to 100 IP addresses.
        public let maxResults: Int?
        /// For the first ListResolverEndpointIpAddresses request, omit this value. If the specified Resolver endpoint has more than MaxResults IP addresses, you can submit another ListResolverEndpointIpAddresses request to get the next group of IP addresses. In the next request, specify the value of NextToken from the previous response.
        public let nextToken: String?
        /// The ID of the Resolver endpoint that you want to get IP addresses for.
        public let resolverEndpointId: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, resolverEndpointId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resolverEndpointId = resolverEndpointId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.resolverEndpointId, name: "resolverEndpointId", parent: name, max: 64)
            try self.validate(self.resolverEndpointId, name: "resolverEndpointId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case resolverEndpointId = "ResolverEndpointId"
        }
    }

    public struct ListResolverEndpointIpAddressesResponse: AWSDecodableShape {
        /// Information about the IP addresses in your VPC that DNS queries originate from (for outbound endpoints) or that you forward DNS queries to (for inbound endpoints).
        public let ipAddresses: [IpAddressResponse]?
        /// The value that you specified for MaxResults in the request.
        public let maxResults: Int?
        /// If the specified endpoint has more than MaxResults IP addresses, you can submit another ListResolverEndpointIpAddresses request to get the next group of IP addresses. In the next request, specify the value of NextToken from the previous response.
        public let nextToken: String?

        public init(ipAddresses: [IpAddressResponse]? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.ipAddresses = ipAddresses
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case ipAddresses = "IpAddresses"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListResolverEndpointsRequest: AWSEncodableShape {
        /// An optional specification to return a subset of Resolver endpoints, such as all inbound Resolver endpoints.  If you submit a second or subsequent ListResolverEndpoints request and specify the NextToken parameter, you must use the same values for Filters, if any, as in the previous request.
        public let filters: [Filter]?
        /// The maximum number of Resolver endpoints that you want to return in the response to a ListResolverEndpoints request. If you don't specify a value for MaxResults, Resolver returns up to 100 Resolver endpoints.
        public let maxResults: Int?
        /// For the first ListResolverEndpoints request, omit this value. If you have more than MaxResults Resolver endpoints, you can submit another ListResolverEndpoints request to get the next group of Resolver endpoints. In the next request, specify the value of NextToken from the previous response.
        public let nextToken: String?

        public init(filters: [Filter]? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filters = filters
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filters?.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filters = "Filters"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListResolverEndpointsResponse: AWSDecodableShape {
        /// The value that you specified for MaxResults in the request.
        public let maxResults: Int?
        /// If more than MaxResults IP addresses match the specified criteria, you can submit another ListResolverEndpoint request to get the next group of results. In the next request, specify the value of NextToken from the previous response.
        public let nextToken: String?
        /// The Resolver endpoints that were created by using the current AWS account, and that match the specified filters, if any.
        public let resolverEndpoints: [ResolverEndpoint]?

        public init(maxResults: Int? = nil, nextToken: String? = nil, resolverEndpoints: [ResolverEndpoint]? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resolverEndpoints = resolverEndpoints
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case resolverEndpoints = "ResolverEndpoints"
        }
    }

    public struct ListResolverQueryLogConfigAssociationsRequest: AWSEncodableShape {
        /// An optional specification to return a subset of query logging associations.  If you submit a second or subsequent ListResolverQueryLogConfigAssociations request and specify the NextToken parameter, you must use the same values for Filters, if any, as in the previous request.
        public let filters: [Filter]?
        /// The maximum number of query logging associations that you want to return in the response to a ListResolverQueryLogConfigAssociations request. If you don't specify a value for MaxResults, Resolver returns up to 100 query logging associations.
        public let maxResults: Int?
        /// For the first ListResolverQueryLogConfigAssociations request, omit this value. If there are more than MaxResults query logging associations that match the values that you specify for Filters, you can submit another ListResolverQueryLogConfigAssociations request to get the next group of associations. In the next request, specify the value of NextToken from the previous response.
        public let nextToken: String?
        /// The element that you want Resolver to sort query logging associations by.   If you submit a second or subsequent ListResolverQueryLogConfigAssociations request and specify the NextToken parameter, you must use the same value for SortBy, if any, as in the previous request.  Valid values include the following elements:    CreationTime: The ID of the query logging association.    Error: If the value of Status is FAILED, the value of Error indicates the cause:     DESTINATION_NOT_FOUND: The specified destination (for example, an Amazon S3 bucket) was deleted.    ACCESS_DENIED: Permissions don't allow sending logs to the destination.   If Status is a value other than FAILED, ERROR is null.    Id: The ID of the query logging association    ResolverQueryLogConfigId: The ID of the query logging configuration    ResourceId: The ID of the VPC that is associated with the query logging configuration    Status: The current status of the configuration. Valid values include the following:    CREATING: Resolver is creating an association between an Amazon VPC and a query logging configuration.    CREATED: The association between an Amazon VPC and a query logging configuration was successfully created. Resolver is logging queries that originate in the specified VPC.    DELETING: Resolver is deleting this query logging association.    FAILED: Resolver either couldn't create or couldn't delete the query logging association. Here are two common causes:   The specified destination (for example, an Amazon S3 bucket) was deleted.   Permissions don't allow sending logs to the destination.
        public let sortBy: String?
        /// If you specified a value for SortBy, the order that you want query logging associations to be listed in, ASCENDING or DESCENDING.  If you submit a second or subsequent ListResolverQueryLogConfigAssociations request and specify the NextToken parameter, you must use the same value for SortOrder, if any, as in the previous request.
        public let sortOrder: SortOrder?

        public init(filters: [Filter]? = nil, maxResults: Int? = nil, nextToken: String? = nil, sortBy: String? = nil, sortOrder: SortOrder? = nil) {
            self.filters = filters
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.sortBy = sortBy
            self.sortOrder = sortOrder
        }

        public func validate(name: String) throws {
            try self.filters?.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.sortBy, name: "sortBy", parent: name, max: 64)
            try self.validate(self.sortBy, name: "sortBy", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filters = "Filters"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case sortBy = "SortBy"
            case sortOrder = "SortOrder"
        }
    }

    public struct ListResolverQueryLogConfigAssociationsResponse: AWSDecodableShape {
        /// If there are more than MaxResults query logging associations, you can submit another ListResolverQueryLogConfigAssociations request to get the next group of associations. In the next request, specify the value of NextToken from the previous response.
        public let nextToken: String?
        /// A list that contains one ResolverQueryLogConfigAssociations element for each query logging association that matches the values that you specified for Filter.
        public let resolverQueryLogConfigAssociations: [ResolverQueryLogConfigAssociation]?
        /// The total number of query logging associations that were created by the current account in the specified Region. This count can differ from the number of associations that are returned in a ListResolverQueryLogConfigAssociations response, depending on the values that you specify in the request.
        public let totalCount: Int?
        /// The total number of query logging associations that were created by the current account in the specified Region and that match the filters that were specified in the ListResolverQueryLogConfigAssociations request. For the total number of associations that were created by the current account in the specified Region, see TotalCount.
        public let totalFilteredCount: Int?

        public init(nextToken: String? = nil, resolverQueryLogConfigAssociations: [ResolverQueryLogConfigAssociation]? = nil, totalCount: Int? = nil, totalFilteredCount: Int? = nil) {
            self.nextToken = nextToken
            self.resolverQueryLogConfigAssociations = resolverQueryLogConfigAssociations
            self.totalCount = totalCount
            self.totalFilteredCount = totalFilteredCount
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case resolverQueryLogConfigAssociations = "ResolverQueryLogConfigAssociations"
            case totalCount = "TotalCount"
            case totalFilteredCount = "TotalFilteredCount"
        }
    }

    public struct ListResolverQueryLogConfigsRequest: AWSEncodableShape {
        /// An optional specification to return a subset of query logging configurations.  If you submit a second or subsequent ListResolverQueryLogConfigs request and specify the NextToken parameter, you must use the same values for Filters, if any, as in the previous request.
        public let filters: [Filter]?
        /// The maximum number of query logging configurations that you want to return in the response to a ListResolverQueryLogConfigs request. If you don't specify a value for MaxResults, Resolver returns up to 100 query logging configurations.
        public let maxResults: Int?
        /// For the first ListResolverQueryLogConfigs request, omit this value. If there are more than MaxResults query logging configurations that match the values that you specify for Filters, you can submit another ListResolverQueryLogConfigs request to get the next group of configurations. In the next request, specify the value of NextToken from the previous response.
        public let nextToken: String?
        /// The element that you want Resolver to sort query logging configurations by.   If you submit a second or subsequent ListResolverQueryLogConfigs request and specify the NextToken parameter, you must use the same value for SortBy, if any, as in the previous request.  Valid values include the following elements:    Arn: The ARN of the query logging configuration    AssociationCount: The number of VPCs that are associated with the specified configuration     CreationTime: The date and time that Resolver returned when the configuration was created    CreatorRequestId: The value that was specified for CreatorRequestId when the configuration was created    DestinationArn: The location that logs are sent to    Id: The ID of the configuration    Name: The name of the configuration    OwnerId: The AWS account number of the account that created the configuration    ShareStatus: Whether the configuration is shared with other AWS accounts or shared with the current account by another AWS account. Sharing is configured through AWS Resource Access Manager (AWS RAM).    Status: The current status of the configuration. Valid values include the following:    CREATING: Resolver is creating the query logging configuration.    CREATED: The query logging configuration was successfully created. Resolver is logging queries that originate in the specified VPC.    DELETING: Resolver is deleting this query logging configuration.    FAILED: Resolver either couldn't create or couldn't delete the query logging configuration. Here are two common causes:   The specified destination (for example, an Amazon S3 bucket) was deleted.   Permissions don't allow sending logs to the destination.
        public let sortBy: String?
        /// If you specified a value for SortBy, the order that you want query logging configurations to be listed in, ASCENDING or DESCENDING.  If you submit a second or subsequent ListResolverQueryLogConfigs request and specify the NextToken parameter, you must use the same value for SortOrder, if any, as in the previous request.
        public let sortOrder: SortOrder?

        public init(filters: [Filter]? = nil, maxResults: Int? = nil, nextToken: String? = nil, sortBy: String? = nil, sortOrder: SortOrder? = nil) {
            self.filters = filters
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.sortBy = sortBy
            self.sortOrder = sortOrder
        }

        public func validate(name: String) throws {
            try self.filters?.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.sortBy, name: "sortBy", parent: name, max: 64)
            try self.validate(self.sortBy, name: "sortBy", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filters = "Filters"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case sortBy = "SortBy"
            case sortOrder = "SortOrder"
        }
    }

    public struct ListResolverQueryLogConfigsResponse: AWSDecodableShape {
        /// If there are more than MaxResults query logging configurations, you can submit another ListResolverQueryLogConfigs request to get the next group of configurations. In the next request, specify the value of NextToken from the previous response.
        public let nextToken: String?
        /// A list that contains one ResolverQueryLogConfig element for each query logging configuration that matches the values that you specified for Filter.
        public let resolverQueryLogConfigs: [ResolverQueryLogConfig]?
        /// The total number of query logging configurations that were created by the current account in the specified Region. This count can differ from the number of query logging configurations that are returned in a ListResolverQueryLogConfigs response, depending on the values that you specify in the request.
        public let totalCount: Int?
        /// The total number of query logging configurations that were created by the current account in the specified Region and that match the filters that were specified in the ListResolverQueryLogConfigs request. For the total number of query logging configurations that were created by the current account in the specified Region, see TotalCount.
        public let totalFilteredCount: Int?

        public init(nextToken: String? = nil, resolverQueryLogConfigs: [ResolverQueryLogConfig]? = nil, totalCount: Int? = nil, totalFilteredCount: Int? = nil) {
            self.nextToken = nextToken
            self.resolverQueryLogConfigs = resolverQueryLogConfigs
            self.totalCount = totalCount
            self.totalFilteredCount = totalFilteredCount
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case resolverQueryLogConfigs = "ResolverQueryLogConfigs"
            case totalCount = "TotalCount"
            case totalFilteredCount = "TotalFilteredCount"
        }
    }

    public struct ListResolverRuleAssociationsRequest: AWSEncodableShape {
        /// An optional specification to return a subset of Resolver rules, such as Resolver rules that are associated with the same VPC ID.  If you submit a second or subsequent ListResolverRuleAssociations request and specify the NextToken parameter, you must use the same values for Filters, if any, as in the previous request.
        public let filters: [Filter]?
        /// The maximum number of rule associations that you want to return in the response to a ListResolverRuleAssociations request. If you don't specify a value for MaxResults, Resolver returns up to 100 rule associations.
        public let maxResults: Int?
        /// For the first ListResolverRuleAssociation request, omit this value. If you have more than MaxResults rule associations, you can submit another ListResolverRuleAssociation request to get the next group of rule associations. In the next request, specify the value of NextToken from the previous response.
        public let nextToken: String?

        public init(filters: [Filter]? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filters = filters
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filters?.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filters = "Filters"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListResolverRuleAssociationsResponse: AWSDecodableShape {
        /// The value that you specified for MaxResults in the request.
        public let maxResults: Int?
        /// If more than MaxResults rule associations match the specified criteria, you can submit another ListResolverRuleAssociation request to get the next group of results. In the next request, specify the value of NextToken from the previous response.
        public let nextToken: String?
        /// The associations that were created between Resolver rules and VPCs using the current AWS account, and that match the specified filters, if any.
        public let resolverRuleAssociations: [ResolverRuleAssociation]?

        public init(maxResults: Int? = nil, nextToken: String? = nil, resolverRuleAssociations: [ResolverRuleAssociation]? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resolverRuleAssociations = resolverRuleAssociations
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case resolverRuleAssociations = "ResolverRuleAssociations"
        }
    }

    public struct ListResolverRulesRequest: AWSEncodableShape {
        /// An optional specification to return a subset of Resolver rules, such as all Resolver rules that are associated with the same Resolver endpoint.  If you submit a second or subsequent ListResolverRules request and specify the NextToken parameter, you must use the same values for Filters, if any, as in the previous request.
        public let filters: [Filter]?
        /// The maximum number of Resolver rules that you want to return in the response to a ListResolverRules request. If you don't specify a value for MaxResults, Resolver returns up to 100 Resolver rules.
        public let maxResults: Int?
        /// For the first ListResolverRules request, omit this value. If you have more than MaxResults Resolver rules, you can submit another ListResolverRules request to get the next group of Resolver rules. In the next request, specify the value of NextToken from the previous response.
        public let nextToken: String?

        public init(filters: [Filter]? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filters = filters
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filters?.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filters = "Filters"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListResolverRulesResponse: AWSDecodableShape {
        /// The value that you specified for MaxResults in the request.
        public let maxResults: Int?
        /// If more than MaxResults Resolver rules match the specified criteria, you can submit another ListResolverRules request to get the next group of results. In the next request, specify the value of NextToken from the previous response.
        public let nextToken: String?
        /// The Resolver rules that were created using the current AWS account and that match the specified filters, if any.
        public let resolverRules: [ResolverRule]?

        public init(maxResults: Int? = nil, nextToken: String? = nil, resolverRules: [ResolverRule]? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resolverRules = resolverRules
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case resolverRules = "ResolverRules"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        /// The maximum number of tags that you want to return in the response to a ListTagsForResource request. If you don't specify a value for MaxResults, Resolver returns up to 100 tags.
        public let maxResults: Int?
        /// For the first ListTagsForResource request, omit this value. If you have more than MaxResults tags, you can submit another ListTagsForResource request to get the next group of tags for the resource. In the next request, specify the value of NextToken from the previous response.
        public let nextToken: String?
        /// The Amazon Resource Name (ARN) for the resource that you want to list tags for.
        public let resourceArn: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, resourceArn: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 255)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case resourceArn = "ResourceArn"
        }
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// If more than MaxResults tags match the specified criteria, you can submit another ListTagsForResource request to get the next group of results. In the next request, specify the value of NextToken from the previous response.
        public let nextToken: String?
        /// The tags that are associated with the resource that you specified in the ListTagsForResource request.
        public let tags: [Tag]?

        public init(nextToken: String? = nil, tags: [Tag]? = nil) {
            self.nextToken = nextToken
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case tags = "Tags"
        }
    }

    public struct PutResolverQueryLogConfigPolicyRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the account that you want to share rules with.
        public let arn: String
        /// An AWS Identity and Access Management policy statement that lists the query logging configurations that you want to share with another AWS account and the operations that you want the account to be able to perform. You can specify the following operations in the Actions section of the statement:    route53resolver:AssociateResolverQueryLogConfig     route53resolver:DisassociateResolverQueryLogConfig     route53resolver:ListResolverQueryLogConfigAssociations     route53resolver:ListResolverQueryLogConfigs    In the Resource section of the statement, you specify the ARNs for the query logging configurations that you want to share with the account that you specified in Arn.
        public let resolverQueryLogConfigPolicy: String

        public init(arn: String, resolverQueryLogConfigPolicy: String) {
            self.arn = arn
            self.resolverQueryLogConfigPolicy = resolverQueryLogConfigPolicy
        }

        public func validate(name: String) throws {
            try self.validate(self.arn, name: "arn", parent: name, max: 255)
            try self.validate(self.arn, name: "arn", parent: name, min: 1)
            try self.validate(self.resolverQueryLogConfigPolicy, name: "resolverQueryLogConfigPolicy", parent: name, max: 5000)
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case resolverQueryLogConfigPolicy = "ResolverQueryLogConfigPolicy"
        }
    }

    public struct PutResolverQueryLogConfigPolicyResponse: AWSDecodableShape {
        /// Whether the PutResolverQueryLogConfigPolicy request was successful.
        public let returnValue: Bool?

        public init(returnValue: Bool? = nil) {
            self.returnValue = returnValue
        }

        private enum CodingKeys: String, CodingKey {
            case returnValue = "ReturnValue"
        }
    }

    public struct PutResolverRulePolicyRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the rule that you want to share with another account.
        public let arn: String
        /// An AWS Identity and Access Management policy statement that lists the rules that you want to share with another AWS account and the operations that you want the account to be able to perform. You can specify the following operations in the Action section of the statement:    route53resolver:GetResolverRule     route53resolver:AssociateResolverRule     route53resolver:DisassociateResolverRule     route53resolver:ListResolverRules     route53resolver:ListResolverRuleAssociations    In the Resource section of the statement, specify the ARN for the rule that you want to share with another account. Specify the same ARN that you specified in Arn.
        public let resolverRulePolicy: String

        public init(arn: String, resolverRulePolicy: String) {
            self.arn = arn
            self.resolverRulePolicy = resolverRulePolicy
        }

        public func validate(name: String) throws {
            try self.validate(self.arn, name: "arn", parent: name, max: 255)
            try self.validate(self.arn, name: "arn", parent: name, min: 1)
            try self.validate(self.resolverRulePolicy, name: "resolverRulePolicy", parent: name, max: 5000)
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case resolverRulePolicy = "ResolverRulePolicy"
        }
    }

    public struct PutResolverRulePolicyResponse: AWSDecodableShape {
        /// Whether the PutResolverRulePolicy request was successful.
        public let returnValue: Bool?

        public init(returnValue: Bool? = nil) {
            self.returnValue = returnValue
        }

        private enum CodingKeys: String, CodingKey {
            case returnValue = "ReturnValue"
        }
    }

    public struct ResolverDnssecConfig: AWSDecodableShape {
        /// The ID for a configuration for DNSSEC validation.
        public let id: String?
        /// The owner account ID of the virtual private cloud (VPC) for a configuration for DNSSEC validation.
        public let ownerId: String?
        /// The ID of the virtual private cloud (VPC) that you're configuring the DNSSEC validation status for.
        public let resourceId: String?
        /// The validation status for a DNSSEC configuration. The status can be one of the following:    ENABLING: DNSSEC validation is being enabled but is not complete.    ENABLED: DNSSEC validation is enabled.    DISABLING: DNSSEC validation is being disabled but is not complete.    DISABLED DNSSEC validation is disabled.
        public let validationStatus: ResolverDNSSECValidationStatus?

        public init(id: String? = nil, ownerId: String? = nil, resourceId: String? = nil, validationStatus: ResolverDNSSECValidationStatus? = nil) {
            self.id = id
            self.ownerId = ownerId
            self.resourceId = resourceId
            self.validationStatus = validationStatus
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case ownerId = "OwnerId"
            case resourceId = "ResourceId"
            case validationStatus = "ValidationStatus"
        }
    }

    public struct ResolverEndpoint: AWSDecodableShape {
        /// The ARN (Amazon Resource Name) for the Resolver endpoint.
        public let arn: String?
        /// The date and time that the endpoint was created, in Unix time format and Coordinated Universal Time (UTC).
        public let creationTime: String?
        /// A unique string that identifies the request that created the Resolver endpoint. The CreatorRequestId allows failed requests to be retried without the risk of executing the operation twice.
        public let creatorRequestId: String?
        /// Indicates whether the Resolver endpoint allows inbound or outbound DNS queries:    INBOUND: allows DNS queries to your VPC from your network    OUTBOUND: allows DNS queries from your VPC to your network
        public let direction: ResolverEndpointDirection?
        /// The ID of the VPC that you want to create the Resolver endpoint in.
        public let hostVPCId: String?
        /// The ID of the Resolver endpoint.
        public let id: String?
        /// The number of IP addresses that the Resolver endpoint can use for DNS queries.
        public let ipAddressCount: Int?
        /// The date and time that the endpoint was last modified, in Unix time format and Coordinated Universal Time (UTC).
        public let modificationTime: String?
        /// The name that you assigned to the Resolver endpoint when you submitted a CreateResolverEndpoint request.
        public let name: String?
        /// The ID of one or more security groups that control access to this VPC. The security group must include one or more inbound rules (for inbound endpoints) or outbound rules (for outbound endpoints). Inbound and outbound rules must allow TCP and UDP access. For inbound access, open port 53. For outbound access, open the port that you're using for DNS queries on your network.
        public let securityGroupIds: [String]?
        /// A code that specifies the current status of the Resolver endpoint. Valid values include the following:    CREATING: Resolver is creating and configuring one or more Amazon VPC network interfaces for this endpoint.    OPERATIONAL: The Amazon VPC network interfaces for this endpoint are correctly configured and able to pass inbound or outbound DNS queries between your network and Resolver.    UPDATING: Resolver is associating or disassociating one or more network interfaces with this endpoint.    AUTO_RECOVERING: Resolver is trying to recover one or more of the network interfaces that are associated with this endpoint. During the recovery process, the endpoint functions with limited capacity because of the limit on the number of DNS queries per IP address (per network interface). For the current limit, see Limits on Route 53 Resolver.    ACTION_NEEDED: This endpoint is unhealthy, and Resolver can't automatically recover it. To resolve the problem, we recommend that you check each IP address that you associated with the endpoint. For each IP address that isn't available, add another IP address and then delete the IP address that isn't available. (An endpoint must always include at least two IP addresses.) A status of ACTION_NEEDED can have a variety of causes. Here are two common causes:   One or more of the network interfaces that are associated with the endpoint were deleted using Amazon VPC.   The network interface couldn't be created for some reason that's outside the control of Resolver.      DELETING: Resolver is deleting this endpoint and the associated network interfaces.
        public let status: ResolverEndpointStatus?
        /// A detailed description of the status of the Resolver endpoint.
        public let statusMessage: String?

        public init(arn: String? = nil, creationTime: String? = nil, creatorRequestId: String? = nil, direction: ResolverEndpointDirection? = nil, hostVPCId: String? = nil, id: String? = nil, ipAddressCount: Int? = nil, modificationTime: String? = nil, name: String? = nil, securityGroupIds: [String]? = nil, status: ResolverEndpointStatus? = nil, statusMessage: String? = nil) {
            self.arn = arn
            self.creationTime = creationTime
            self.creatorRequestId = creatorRequestId
            self.direction = direction
            self.hostVPCId = hostVPCId
            self.id = id
            self.ipAddressCount = ipAddressCount
            self.modificationTime = modificationTime
            self.name = name
            self.securityGroupIds = securityGroupIds
            self.status = status
            self.statusMessage = statusMessage
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case creationTime = "CreationTime"
            case creatorRequestId = "CreatorRequestId"
            case direction = "Direction"
            case hostVPCId = "HostVPCId"
            case id = "Id"
            case ipAddressCount = "IpAddressCount"
            case modificationTime = "ModificationTime"
            case name = "Name"
            case securityGroupIds = "SecurityGroupIds"
            case status = "Status"
            case statusMessage = "StatusMessage"
        }
    }

    public struct ResolverQueryLogConfig: AWSDecodableShape {
        /// The ARN for the query logging configuration.
        public let arn: String?
        /// The number of VPCs that are associated with the query logging configuration.
        public let associationCount: Int?
        /// The date and time that the query logging configuration was created, in Unix time format and Coordinated Universal Time (UTC).
        public let creationTime: String?
        /// A unique string that identifies the request that created the query logging configuration. The CreatorRequestId allows failed requests to be retried without the risk of executing the operation twice.
        public let creatorRequestId: String?
        /// The ARN of the resource that you want Resolver to send query logs: an Amazon S3 bucket, a CloudWatch Logs log group, or a Kinesis Data Firehose delivery stream.
        public let destinationArn: String?
        /// The ID for the query logging configuration.
        public let id: String?
        /// The name of the query logging configuration.
        public let name: String?
        /// The AWS account ID for the account that created the query logging configuration.
        public let ownerId: String?
        /// An indication of whether the query logging configuration is shared with other AWS accounts, or was shared with the current account by another AWS account. Sharing is configured through AWS Resource Access Manager (AWS RAM).
        public let shareStatus: ShareStatus?
        /// The status of the specified query logging configuration. Valid values include the following:    CREATING: Resolver is creating the query logging configuration.    CREATED: The query logging configuration was successfully created. Resolver is logging queries that originate in the specified VPC.    DELETING: Resolver is deleting this query logging configuration.    FAILED: Resolver can't deliver logs to the location that is specified in the query logging configuration. Here are two common causes:   The specified destination (for example, an Amazon S3 bucket) was deleted.   Permissions don't allow sending logs to the destination.
        public let status: ResolverQueryLogConfigStatus?

        public init(arn: String? = nil, associationCount: Int? = nil, creationTime: String? = nil, creatorRequestId: String? = nil, destinationArn: String? = nil, id: String? = nil, name: String? = nil, ownerId: String? = nil, shareStatus: ShareStatus? = nil, status: ResolverQueryLogConfigStatus? = nil) {
            self.arn = arn
            self.associationCount = associationCount
            self.creationTime = creationTime
            self.creatorRequestId = creatorRequestId
            self.destinationArn = destinationArn
            self.id = id
            self.name = name
            self.ownerId = ownerId
            self.shareStatus = shareStatus
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case associationCount = "AssociationCount"
            case creationTime = "CreationTime"
            case creatorRequestId = "CreatorRequestId"
            case destinationArn = "DestinationArn"
            case id = "Id"
            case name = "Name"
            case ownerId = "OwnerId"
            case shareStatus = "ShareStatus"
            case status = "Status"
        }
    }

    public struct ResolverQueryLogConfigAssociation: AWSDecodableShape {
        /// The date and time that the VPC was associated with the query logging configuration, in Unix time format and Coordinated Universal Time (UTC).
        public let creationTime: String?
        /// If the value of Status is FAILED, the value of Error indicates the cause:    DESTINATION_NOT_FOUND: The specified destination (for example, an Amazon S3 bucket) was deleted.    ACCESS_DENIED: Permissions don't allow sending logs to the destination.   If the value of Status is a value other than FAILED, Error is null.
        public let error: ResolverQueryLogConfigAssociationError?
        /// Contains additional information about the error. If the value or Error is null, the value of ErrorMessage also is null.
        public let errorMessage: String?
        /// The ID of the query logging association.
        public let id: String?
        /// The ID of the query logging configuration that a VPC is associated with.
        public let resolverQueryLogConfigId: String?
        /// The ID of the Amazon VPC that is associated with the query logging configuration.
        public let resourceId: String?
        /// The status of the specified query logging association. Valid values include the following:    CREATING: Resolver is creating an association between an Amazon VPC and a query logging configuration.    CREATED: The association between an Amazon VPC and a query logging configuration was successfully created. Resolver is logging queries that originate in the specified VPC.    DELETING: Resolver is deleting this query logging association.    FAILED: Resolver either couldn't create or couldn't delete the query logging association.
        public let status: ResolverQueryLogConfigAssociationStatus?

        public init(creationTime: String? = nil, error: ResolverQueryLogConfigAssociationError? = nil, errorMessage: String? = nil, id: String? = nil, resolverQueryLogConfigId: String? = nil, resourceId: String? = nil, status: ResolverQueryLogConfigAssociationStatus? = nil) {
            self.creationTime = creationTime
            self.error = error
            self.errorMessage = errorMessage
            self.id = id
            self.resolverQueryLogConfigId = resolverQueryLogConfigId
            self.resourceId = resourceId
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime = "CreationTime"
            case error = "Error"
            case errorMessage = "ErrorMessage"
            case id = "Id"
            case resolverQueryLogConfigId = "ResolverQueryLogConfigId"
            case resourceId = "ResourceId"
            case status = "Status"
        }
    }

    public struct ResolverRule: AWSDecodableShape {
        /// The ARN (Amazon Resource Name) for the Resolver rule specified by Id.
        public let arn: String?
        /// The date and time that the Resolver rule was created, in Unix time format and Coordinated Universal Time (UTC).
        public let creationTime: String?
        /// A unique string that you specified when you created the Resolver rule. CreatorRequestId identifies the request and allows failed requests to be retried without the risk of executing the operation twice.
        public let creatorRequestId: String?
        /// DNS queries for this domain name are forwarded to the IP addresses that are specified in TargetIps. If a query matches multiple Resolver rules (example.com and www.example.com), the query is routed using the Resolver rule that contains the most specific domain name (www.example.com).
        public let domainName: String?
        /// The ID that Resolver assigned to the Resolver rule when you created it.
        public let id: String?
        /// The date and time that the Resolver rule was last updated, in Unix time format and Coordinated Universal Time (UTC).
        public let modificationTime: String?
        /// The name for the Resolver rule, which you specified when you created the Resolver rule.
        public let name: String?
        /// When a rule is shared with another AWS account, the account ID of the account that the rule is shared with.
        public let ownerId: String?
        /// The ID of the endpoint that the rule is associated with.
        public let resolverEndpointId: String?
        /// When you want to forward DNS queries for specified domain name to resolvers on your network, specify FORWARD. When you have a forwarding rule to forward DNS queries for a domain to your network and you want Resolver to process queries for a subdomain of that domain, specify SYSTEM. For example, to forward DNS queries for example.com to resolvers on your network, you create a rule and specify FORWARD for RuleType. To then have Resolver process queries for apex.example.com, you create a rule and specify SYSTEM for RuleType. Currently, only Resolver can create rules that have a value of RECURSIVE for RuleType.
        public let ruleType: RuleTypeOption?
        /// Whether the rules is shared and, if so, whether the current account is sharing the rule with another account, or another account is sharing the rule with the current account.
        public let shareStatus: ShareStatus?
        /// A code that specifies the current status of the Resolver rule.
        public let status: ResolverRuleStatus?
        /// A detailed description of the status of a Resolver rule.
        public let statusMessage: String?
        /// An array that contains the IP addresses and ports that an outbound endpoint forwards DNS queries to. Typically, these are the IP addresses of DNS resolvers on your network. Specify IPv4 addresses. IPv6 is not supported.
        public let targetIps: [TargetAddress]?

        public init(arn: String? = nil, creationTime: String? = nil, creatorRequestId: String? = nil, domainName: String? = nil, id: String? = nil, modificationTime: String? = nil, name: String? = nil, ownerId: String? = nil, resolverEndpointId: String? = nil, ruleType: RuleTypeOption? = nil, shareStatus: ShareStatus? = nil, status: ResolverRuleStatus? = nil, statusMessage: String? = nil, targetIps: [TargetAddress]? = nil) {
            self.arn = arn
            self.creationTime = creationTime
            self.creatorRequestId = creatorRequestId
            self.domainName = domainName
            self.id = id
            self.modificationTime = modificationTime
            self.name = name
            self.ownerId = ownerId
            self.resolverEndpointId = resolverEndpointId
            self.ruleType = ruleType
            self.shareStatus = shareStatus
            self.status = status
            self.statusMessage = statusMessage
            self.targetIps = targetIps
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case creationTime = "CreationTime"
            case creatorRequestId = "CreatorRequestId"
            case domainName = "DomainName"
            case id = "Id"
            case modificationTime = "ModificationTime"
            case name = "Name"
            case ownerId = "OwnerId"
            case resolverEndpointId = "ResolverEndpointId"
            case ruleType = "RuleType"
            case shareStatus = "ShareStatus"
            case status = "Status"
            case statusMessage = "StatusMessage"
            case targetIps = "TargetIps"
        }
    }

    public struct ResolverRuleAssociation: AWSDecodableShape {
        /// The ID of the association between a Resolver rule and a VPC. Resolver assigns this value when you submit an AssociateResolverRule request.
        public let id: String?
        /// The name of an association between a Resolver rule and a VPC.
        public let name: String?
        /// The ID of the Resolver rule that you associated with the VPC that is specified by VPCId.
        public let resolverRuleId: String?
        /// A code that specifies the current status of the association between a Resolver rule and a VPC.
        public let status: ResolverRuleAssociationStatus?
        /// A detailed description of the status of the association between a Resolver rule and a VPC.
        public let statusMessage: String?
        /// The ID of the VPC that you associated the Resolver rule with.
        public let vPCId: String?

        public init(id: String? = nil, name: String? = nil, resolverRuleId: String? = nil, status: ResolverRuleAssociationStatus? = nil, statusMessage: String? = nil, vPCId: String? = nil) {
            self.id = id
            self.name = name
            self.resolverRuleId = resolverRuleId
            self.status = status
            self.statusMessage = statusMessage
            self.vPCId = vPCId
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case name = "Name"
            case resolverRuleId = "ResolverRuleId"
            case status = "Status"
            case statusMessage = "StatusMessage"
            case vPCId = "VPCId"
        }
    }

    public struct ResolverRuleConfig: AWSEncodableShape {
        /// The new name for the Resolver rule. The name that you specify appears in the Resolver dashboard in the Route 53 console.
        public let name: String?
        /// The ID of the new outbound Resolver endpoint that you want to use to route DNS queries to the IP addresses that you specify in TargetIps.
        public let resolverEndpointId: String?
        /// For DNS queries that originate in your VPC, the new IP addresses that you want to route outbound DNS queries to.
        public let targetIps: [TargetAddress]?

        public init(name: String? = nil, resolverEndpointId: String? = nil, targetIps: [TargetAddress]? = nil) {
            self.name = name
            self.resolverEndpointId = resolverEndpointId
            self.targetIps = targetIps
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, pattern: "(?!^[0-9]+$)([a-zA-Z0-9\\-_' ']+)")
            try self.validate(self.resolverEndpointId, name: "resolverEndpointId", parent: name, max: 64)
            try self.validate(self.resolverEndpointId, name: "resolverEndpointId", parent: name, min: 1)
            try self.targetIps?.forEach {
                try $0.validate(name: "\(name).targetIps[]")
            }
            try self.validate(self.targetIps, name: "targetIps", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case resolverEndpointId = "ResolverEndpointId"
            case targetIps = "TargetIps"
        }
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// The name for the tag. For example, if you want to associate Resolver resources with the account IDs of your customers for billing purposes, the value of Key might be account-id.
        public let key: String
        /// The value for the tag. For example, if Key is account-id, then Value might be the ID of the customer account that you're creating the resource for.
        public let value: String

        public init(key: String, value: String) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, max: 256)
            try self.validate(self.value, name: "value", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) for the resource that you want to add tags to. To get the ARN for a resource, use the applicable Get or List command:     GetResolverEndpoint     GetResolverRule     GetResolverRuleAssociation     ListResolverEndpoints     ListResolverRuleAssociations     ListResolverRules
        public let resourceArn: String
        /// The tags that you want to add to the specified resource.
        public let tags: [Tag]

        public init(resourceArn: String, tags: [Tag]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 255)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.tags.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
            case tags = "Tags"
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct TargetAddress: AWSEncodableShape & AWSDecodableShape {
        /// One IP address that you want to forward DNS queries to. You can specify only IPv4 addresses.
        public let ip: String
        /// The port at Ip that you want to forward DNS queries to.
        public let port: Int?

        public init(ip: String, port: Int? = nil) {
            self.ip = ip
            self.port = port
        }

        public func validate(name: String) throws {
            try self.validate(self.ip, name: "ip", parent: name, max: 36)
            try self.validate(self.ip, name: "ip", parent: name, min: 7)
            try self.validate(self.port, name: "port", parent: name, max: 65535)
            try self.validate(self.port, name: "port", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case ip = "Ip"
            case port = "Port"
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) for the resource that you want to remove tags from. To get the ARN for a resource, use the applicable Get or List command:     GetResolverEndpoint     GetResolverRule     GetResolverRuleAssociation     ListResolverEndpoints     ListResolverRuleAssociations     ListResolverRules
        public let resourceArn: String
        /// The tags that you want to remove to the specified resource.
        public let tagKeys: [String]

        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 255)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
            case tagKeys = "TagKeys"
        }
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateResolverDnssecConfigRequest: AWSEncodableShape {
        /// The ID of the virtual private cloud (VPC) that you're updating the DNSSEC validation status for.
        public let resourceId: String
        /// The new value that you are specifying for DNSSEC validation for the VPC. The value can be ENABLE or DISABLE. Be aware that it can take time for a validation status change to be completed.
        public let validation: Validation

        public init(resourceId: String, validation: Validation) {
            self.resourceId = resourceId
            self.validation = validation
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceId, name: "resourceId", parent: name, max: 64)
            try self.validate(self.resourceId, name: "resourceId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceId = "ResourceId"
            case validation = "Validation"
        }
    }

    public struct UpdateResolverDnssecConfigResponse: AWSDecodableShape {
        /// A complex type that contains settings for the specified DNSSEC configuration.
        public let resolverDNSSECConfig: ResolverDnssecConfig?

        public init(resolverDNSSECConfig: ResolverDnssecConfig? = nil) {
            self.resolverDNSSECConfig = resolverDNSSECConfig
        }

        private enum CodingKeys: String, CodingKey {
            case resolverDNSSECConfig = "ResolverDNSSECConfig"
        }
    }

    public struct UpdateResolverEndpointRequest: AWSEncodableShape {
        /// The name of the Resolver endpoint that you want to update.
        public let name: String?
        /// The ID of the Resolver endpoint that you want to update.
        public let resolverEndpointId: String

        public init(name: String? = nil, resolverEndpointId: String) {
            self.name = name
            self.resolverEndpointId = resolverEndpointId
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, pattern: "(?!^[0-9]+$)([a-zA-Z0-9\\-_' ']+)")
            try self.validate(self.resolverEndpointId, name: "resolverEndpointId", parent: name, max: 64)
            try self.validate(self.resolverEndpointId, name: "resolverEndpointId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case resolverEndpointId = "ResolverEndpointId"
        }
    }

    public struct UpdateResolverEndpointResponse: AWSDecodableShape {
        /// The response to an UpdateResolverEndpoint request.
        public let resolverEndpoint: ResolverEndpoint?

        public init(resolverEndpoint: ResolverEndpoint? = nil) {
            self.resolverEndpoint = resolverEndpoint
        }

        private enum CodingKeys: String, CodingKey {
            case resolverEndpoint = "ResolverEndpoint"
        }
    }

    public struct UpdateResolverRuleRequest: AWSEncodableShape {
        /// The new settings for the Resolver rule.
        public let config: ResolverRuleConfig
        /// The ID of the Resolver rule that you want to update.
        public let resolverRuleId: String

        public init(config: ResolverRuleConfig, resolverRuleId: String) {
            self.config = config
            self.resolverRuleId = resolverRuleId
        }

        public func validate(name: String) throws {
            try self.config.validate(name: "\(name).config")
            try self.validate(self.resolverRuleId, name: "resolverRuleId", parent: name, max: 64)
            try self.validate(self.resolverRuleId, name: "resolverRuleId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case config = "Config"
            case resolverRuleId = "ResolverRuleId"
        }
    }

    public struct UpdateResolverRuleResponse: AWSDecodableShape {
        /// The response to an UpdateResolverRule request.
        public let resolverRule: ResolverRule?

        public init(resolverRule: ResolverRule? = nil) {
            self.resolverRule = resolverRule
        }

        private enum CodingKeys: String, CodingKey {
            case resolverRule = "ResolverRule"
        }
    }
}
